/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.menosehmais.model;

import br.com.menosehmais.framework.security.role.Role;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import org.hibernate.validator.constraints.NotEmpty;

/**
 *
 * @author Junior JAFJ
 */
@Entity(name="empresa")
public class EmpresaDO extends ContaDO {
    @OneToMany
    private List<PortletDO> portlet;

    @OneToMany
    private List<ContratoDO> contratos;
    
    @NotEmpty
    //@Pattern(regexp="[0-9]{11} | [0-9]{14}")
    private String cpfCnpj;
    
    public String getCpfCnpj() {
        return cpfCnpj;
    }

    public void setCpfCnpj(String cpfCnpj) {
        this.cpfCnpj = cpfCnpj;
    }

    public List<PortletDO> getPortlet() {
        return portlet;
    }

    public void setPortlet(List<PortletDO> portlet) {
        this.portlet = portlet;
    }

    public List<ContratoDO> getContratos() {
        return contratos;
    }

    public void setContratos(List<ContratoDO> contratos) {
        this.contratos = contratos;
    }

    @Override
    public Role role() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    
}
